package com.hymjweb.demo.hymj.finance_manage.statistics.service;

import com.hymjweb.demo.framework.result.MIniUIGridResultMap;
import com.hymjweb.demo.framework.sys.BaseService;
import com.hymjweb.demo.hymj.finance_manage.statistics.mapper.CwStatisticsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CwStatisticsService extends BaseService {

    @Autowired
    private CwStatisticsMapper cwStatisticsMapper;

    /**
     * 根据参数查询业务业绩
     * @param param
     * @return
     */
    public Object querySalesmanStatisticsList(Map param) {
        // 设置公共查询参数,加上部门
        this.setQueryCommParam(param);
        this.pageListInit(param);
        List list = cwStatisticsMapper.querySalesmanStatisticsList(param);
        MIniUIGridResultMap resultMap = this.pageToGrid(list);
        return resultMap;

    }

    public Object queryReceivablesStatisticsList(Map param) {
        // 设置公共查询参数,加上部门
        this.setQueryCommParam(param);
        this.pageListInit(param);
        List list = cwStatisticsMapper.queryReceivablesStatisticsList(param);
        MIniUIGridResultMap resultMap = this.pageToGrid(list);
        return resultMap;
    }
}
